package niuke;

import java.util.Scanner;

/**
 * @author cyt
 * @create 2020-05-21 20:11
 */
public class B {
 // aba aba aba b a a b
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int count = 0;
        for (int i = str.length() -1 ; i > 0; i--) {
            String ans = str.substring(0, i);
            if (isStr(ans)) {
                count = i;
                break;
            }
        }
        System.out.println(count);
    }

    static boolean isStr(String s) {
        if (s.length() % 2 == 1) {
            return false;
        }
        String s1 = s.substring(0, s.length() / 2);

        String s2 = s.substring(s.length() / 2);
        if (s1.equals(s2)) {
            return true;
        } else {
            return false;
        }
    }
}
